<?php defined('IN_PHPCMS') or exit('Access Denied'); ?><?php include admin_template('phpcms','header'); ?>

<!--begin main-->

<div id="main">

  <div id="main_l" class="bdr_1">

    <!--位置导航-->

    <div id="position"><a href="">首页</a><?php echo catpos($r['catid']);?></div>

    <div id="content">

      <div id="content_head">

        <!--文章标题-->

        <h1><?php if($titleintact) { ?><?php echo $titleintact;?><?php } else { ?><?php echo $title;?><?php } ?></h1>

        <!--基本属性-->

        <h2><span><?php echo $updatetime;?></span> 作者：<?php if($author) { ?><?php echo $author;?><?php } else { ?><?php echo $userid;?><?php } ?> 来源：<?php echo $copyfrom;?> <?php if($PHPCMS[show_hits]) { ?>浏览次数：<span id="hits">0</span><?php } ?> 

<?php if(isset($MODULE[comment])) { ?><?php list($keyid, $verify) = keyid_make('phpcms', 'content', 'title', $contentid);?>

<a href="<?php echo $MODULE['comment']['url'];?>?keyid=<?php echo $keyid;?>&verify=<?php echo $verify;?>" style="color:red;">网友评论 <span id="comments_top">0</span> 条</a>

<?php } ?></h2>

      </div>

      <!--简单描述-->

      <?php if($description) { ?>

      <div id="digest"><?php echo $description;?></div>

      <?php } ?>

      <!--正文-->

      <div id="endtext">

<?php if($allow_priv) { ?><!--判断阅读权限-->

<?php if($allow_readpoint) { ?><!--判断是否已经扣点-->

<?php echo $content;?>

<?php } else { ?>

<span style='background:#E4F5FA'><a href='lvmao_getinfo.php?contentid=<?php echo $contentid;?>'>阅读本文需要消耗<font color='red'><?php echo $needscore;?></font>积分，您确认查看吗？</a></span>

<?php } ?>

<?php } else { ?>

<font color="#FF0000">您没有权限阅读</font>

<?php } ?>

  </div>

      <?php if($keywords) { ?>

      <div id="keyword"><strong>关键词：</strong><?php echo $keywords;?></div>

      <?php } ?>

      <?php if($titles) { ?>

      <div id="titles">

        <h3>本文导航</h3>

        <?php echo $titles;?> </div>

      <?php } ?>

      <!--分页-->

      <div id="pages"><?php echo $pages;?></div>

      <!--心情指数模块-->

      <?php if(isset($MODULE[mood])) { ?>

      <div id="moodrank_div"></div>

      <script  type="text/javascript">var contentid = <?php echo $contentid;?>;</script>

      <script type="text/javascript" id="callback_js"></script>

      <script type="text/javascript" src="data/moodrank/1.js"></script>

      <?php } ?>

      <?php if(isset($MODULE[digg])) { ?>

      <?php include admin_template('digg','show'); ?>

      <?php } ?>

<div class="clear"></div>

    <div class="box" style="margin-top:1%;">

      <h3>相关文章</h3>

      <ul class="text_list">

        <div id='tag_内容页相关信息'><?php if(isset($r)) echo tag('phpcms', 'tag_content', "SELECT DISTINCT c.contentid,c.title,c.style,c.url FROM `zzinfo_content` c,`zzinfo_content_tag` t  WHERE c.contentid=t.contentid and c.`status`=99 AND t.`tag` IN(".get_sql_in($r[keywords]).") ORDER BY c.contentid DESC", 0, 10, array (  'class' => 'url',  'target' => '_blank',  'titlelen' => '46',));?></div><div class='tag_float_div' id='tag_float_div_内容页相关信息' tagname='内容页相关信息' module='phpcms' title='点击修改中文标签“{tag_内容页相关信息}”'></div> 

      </ul>

    </div>

      <div class="clear"></div>

      <?php if(isset($MODULE[mail])) { ?>

      <form action="<?php echo $MODULE['mail']['url'];?>sendmail.php" name="sendmail" id="sendmail">

        <input type="hidden" name="title" value="推荐：<?php echo $title;?>" />

        <input type="hidden" name="content" value=" <a href='<?php echo SITE_URL;?><?php echo $url;?>' target='_blank'><?php echo $title;?></a><br/>" />

      </form>

      <?php } ?>

       <?php if(isset($MODULE[error_report])) { ?>

      <form action="<?php echo $MODULE['error_report']['url'];?>error_report.php" name="errors" id="errors">

        <input type="hidden" name="title" value="<?php echo $title;?>" />

<input type="hidden" name="contentid" value="<?php echo $contentid;?>" />

      </form>

      <?php } ?>

      <p id="text_1" style="margin-top:1%;">

        <?php if(isset($MODULE[error_report])) { ?><a href="javascript:$('#errors').submit();">[错误报告]</a><?php } ?> 

        <?php if(isset($MODULE[mail])) { ?><a href="javascript:$('#sendmail').submit();">[推荐]</a><?php } ?> 

        <a href="javascript:myAddPanel('<?php echo $title;?>',window.location.href)">[收藏]</a>

        <a href="javascript:window.print();">[打印]</a> <a href="javascript:window.close();">[关闭]</a> 

        <a href="<?php echo SITE_URL;?><?php echo $url;?>#top">[返回顶部]</a> </p>



      <!--评论-->

      <?php if(isset($MODULE[comment])) { ?>

      <?php list($keyid, $verify) = keyid_make('phpcms', 'content', 'title', $contentid);?>

      <div id="commnent_tag">

        <a href="<?php echo $MODULE['comment']['url'];?>?keyid=<?php echo $keyid;?>&verify=<?php echo $verify;?>"><img src="images/comment.gif" />

        已有<strong class="c_red"><span id="comments">0</span></strong>位网友发表了看法</a>

      </div>

      <div class="commenttext" style="text-align:center;margin-top:2%">

        <form action="<?php echo $MODULE['comment']['url'];?>?action=addpost" method="post" onSubmit="return checkForm();">

<input type="hidden" name="keyid" value="<?php echo $keyid;?>"/>

<input type="hidden" name="verify" value="<?php echo $verify;?>"/>

<ul>

          <li>

            <textarea cols="100" rows="8" name="comment" id="comment" onfocus="reply_clearfield()" onblur="reply_restoration()"></textarea>

          </li>

          <li style="text-align:left;margin-left:2%;margin-top:1%;">

            <span id="checker"></span>

            <input id="dosubmit" name="dosubmit" type="submit" value="发表评论" />

          </li>

        </ul>

        </form>

      </div>

      <script type="text/javascript" src="data/js/comment_setting.js"></script>

      <script type="text/javascript">

      <!--

        $().ready(function() {        

            if(setting.ischecklogin == 0 && getcookie('auth') === null)

            {

                $('#comment').val("请您登陆后发表评论！");

                $('#comment').attr("disabled","disabled");

                $('#dosubmit').attr("disabled","disabled");

            }

            else 

            {

                $('#comment').val("我也来说两句！");

            }

        });

        function reply_restoration()

        {

            if($('#comment').val() == '')

            {

                $('#comment').val("我也来说两句！");

            }

        }

        function reply_clearfield()

        {

            if ($('#comment').val() == "我也来说两句！") 

            {

                $('#comment').val("");   

            }            

            $.ajax({

                 type: "POST",

                 url: "<?php echo $MODULE['comment']['url'];?>?action=ajaxcheckcode",

                 data:   "",

                 dataType: "html",

                 success: function(msg)

                 {

                    if(msg)

                    {

                        $('#checker').html("验证码："+msg+"&nbsp;");

                    }                    

                 } 

             });

        }

        function checkForm()

        {

            if($('#comment').val() == '' || $('#comment').val() == "我也来说两句！")

            {

                alert("内容不能为空");

                $('#comment').focus();

                return false;

            }

            if($('#checkcode').val() == '' )

            {

                alert("验证码不能为空");

                $('#checkcode').focus();

                return false;

            }

            if ($('#comment').val().length > 1000) 

            {

                alert("内容太长，最多 1000 个文字");

                return false;

            }

        }

      //-->

      </script>

    <?php } ?> 

    </div>

    

  </div>

  <div id="main_r">

    <!--广告位-->

    <div class="ad_side">

      <script language="javascript" src="data/js.php?id=5"></script>

    </div>

    <h4>最新图片文章</h4>

    <div>

      <ul class="pic_list">

        <div id='tag_内容页图片最新标签'><?php if(isset($catid)) echo tag('phpcms', 'tag_content_pic', "SELECT contentid,catid,typeid,areaid,title,style,thumb,keywords,description,userid,updatetime,inputtime,url FROM `zzinfo_content` WHERE  status=99   AND  `thumb`!='' ".get_sql_catid($catid)." ORDER BY contentid DESC", 0, 4, array (  'class' => 'url',  'target' => '_blank',  'titlelen' => '14',  'height' => '80',  'width' => '120',));?></div><div class='tag_float_div' id='tag_float_div_内容页图片最新标签' tagname='内容页图片最新标签' module='phpcms' title='点击修改中文标签“{tag_内容页图片最新标签}”'></div>

      </ul>

    </div>

    <h4>最新文章</h4>

    <div>

      <ul class="text_list">

        <div id='tag_内容页列表最新标签'><?php if(isset($catid)) echo tag('phpcms', 'tag_content_lvmao', "SELECT contentid,catid,typeid,areaid,title,style,thumb,keywords,description,userid,updatetime,inputtime,url FROM `zzinfo_content` WHERE  status=99  ".get_sql_catid($catid)." ORDER BY contentid DESC", 0, 10, array (  'class' => 'url',  'target' => '_blank',  'titlelen' => '46',));?></div><div class='tag_float_div' id='tag_float_div_内容页列表最新标签' tagname='内容页列表最新标签' module='phpcms' title='点击修改中文标签“{tag_内容页列表最新标签}”'></div>

      </ul>

    </div>

<?php echo block_edit("list_article", 1);?>

  </div>

</div>

<!--end main-->

<script language="JavaScript" src="count.php?contentid=<?php echo $contentid;?>"></script>

<?php include admin_template('phpcms','footer'); ?>